#ifndef _CTRL_HUMI_TEMP_H_
#define _CTRL_HUMI_TEMP_H_

#include "stdio.h"
#include "SHT40.h"
#include "ESP_log.h"
#include "esp_err.h"
 #include "aliot_dm.h"
#include "mqtt_aliot.h"
#include "mqtt_client.h"
#include "data2nvs.h"
#include "esp_err.h"
#include "voltage.h"
#define MAX_HUMI 100
#define MIN_HUMI 0
#define MAX_TEMP 125
#define MIN_TEMP -40
#define LOWPOW_ALARM 20

typedef enum {
    upperalarm, //高温高湿报警
    loweralarm, //低温低湿报警
    cancel      //正常状态
}alarm_state;


    
void post_ctrl_data(esp_mqtt_event_handle_t data);
void mqtt_read_data();

#endif